﻿@{
    Layout = null;
    Response.ContentType = "application/xrds+xml";
    var uri = new Uri(Request.Url, Response.ApplyAppPathModifier("~/OpenId/Provider")).ToString();
}<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds"
           xmlns:openid="http://openid.net/xmlns/1.0"
           xmlns="xri://$xrd*($v*2.0)">
    <XRD>
        <Service priority="10">
            @if (ViewData["OPIdentifier"] != null) {
            <Type>http://specs.openid.net/auth/2.0/server</Type>
             } else {
            <Type>http://specs.openid.net/auth/2.0/signon</Type>
            }
            <Type>http://openid.net/extensions/sreg/1.1</Type>
            <Type>http://axschema.org/contact/email</Type>

            <URI>@uri</URI>
        </Service>
        @if (ViewData["OPIdentifier"] == null) {
        <Service priority="20">
            <Type>http://openid.net/signon/1.0</Type>
            <Type>http://openid.net/extensions/sreg/1.1</Type>
            <Type>http://axschema.org/contact/email</Type>
            <URI>@uri</URI>
        </Service>
        }
    </XRD>
</xrds:XRDS>